package com.his.controller;

import com.his.bean.DzmHisRegisteredfeeSub;
import com.his.service.DzmHisRegisteredfeeSubService;
import com.his.utils.ResponseResult;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dzmHisregisteredfeesubs")
public class DzmHisRegisteredfeeSubController {
    @Autowired
    DzmHisRegisteredfeeSubService dzmHisRegisteredfeeSubService;
    @GetMapping("/selects")
    public ResponseResult SelectAll(DzmHisRegisteredfeeSub dzmHisRegisteredfeeSub){
        List<DzmHisRegisteredfeeSub> list = dzmHisRegisteredfeeSubService.selectAll(dzmHisRegisteredfeeSub);
        return  new ResponseResult(200,"成功",list);
    }

    @PostMapping("/inserts")
    public ResponseResult add(DzmHisRegisteredfeeSub dzmHisRegisteredfeeSub){
        dzmHisRegisteredfeeSubService.add(dzmHisRegisteredfeeSub);
        return new ResponseResult(200,"成功");
    }
}
